<template>
  <div class="edit-container">
    <el-form v-loading="formLoading" ref="form" :model="form" :rules="rules" label-width="100px">
      <el-descriptions title="项目信息：" :column="3" border>
        <el-descriptions-item labelStyle="font-weight: bold" label="订单号">{{ form.orderNo }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="户号">{{ form.account }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="用户姓名">{{ form.userName }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="单位名称">{{ form.companyName }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="用户详细地址">{{ form.userAddress }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="缴费金额(元)">{{ form.payMoney }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="燃气表余额(m³)">{{ form.gasMeterBalance }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="类型">{{ form.typeStr }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="状态">{{ form.stateStr }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="支付失败原因">{{ form.reason }}
        </el-descriptions-item>
        <el-descriptions-item labelStyle="font-weight: bold" label="创建时间">{{ form.createTime }}
        </el-descriptions-item>
      </el-descriptions>
    </el-form>
  </div>
</template>
<script>

export default {
  components: {},
  props: {
    editData: {
      type: Object,
      default: () => {
        return {rules: []}
      }
    },
  },
  data() {
    return {
      form: {
        id: null,
        orderNo: '',
        account: '',
        userName: '',
        companyName: '',
        userAddress: '',
        payMoney: '',
        gasMeterBalance: '',
        type: '',
        typeStr: '',
        state: '',
        stateStr: '',
        reason: '',
        createTime: '',
      },
      rules: {},
      saveLoading: false,
      formLoading: false,
    }
  },
  mounted() {
    this.getDetail();
  },
  methods: {
    getDetail() {
      this.form = this.editData
    },
    close() {
      this.$emit('hideEditDialog')
    }
  }
}
</script>
